package com.xunqi.permission.param;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Getter
@Setter
@ToString
public class AclModuleParam {

    /**
     * 权限模块id
     */
    private Integer id;
    /**
     * 权限模块名称
     */
    @NotBlank(message = "权限模块名称不允许为空")
    @Length(min = 2,max = 64,message = "权限模块名称长度需要在2-64个字符之间")
    private String name;
    /**
     * 上级权限模块id
     */
    private Integer parentId = 0;
    /**
     * 权限模块在当前层级下的顺序，由小到大
     */
    @NotNull(message = "权限模块展示顺序不允许为空")
    private Integer seq;
    /**
     * 状态，1：正常，0：冻结
     */
    @NotNull(message = "权限模块状态不允许为空")
    @Min(value = 0,message = "权限模块状态不合法")
    @Max(value = 1,message = "权限模块状态不合法")
    private Integer status;
    /**
     * 备注
     */
    @Length(min = 1,max = 200,message = "权限模块的备注需要在1-200个字符以内")
    private String remark;

}
